use std::time::Duration;
use mitoo::RabbitMQUtil;


#[tokio::main]
async fn main() {
    // https://github.com/gftea/amqprs/blob/main/examples/src/basic_pub_sub.rs
    let util = RabbitMQUtil::new("192.168.1.187", 5672, "guest", "guest").await;
    util.consume("hello", |basic_properties, content| async move {
        println!("===============>{}", String::from_utf8(content).unwrap());
        println!("===============>{:?}", basic_properties);
    }).await;
    tokio::time::sleep(Duration::from_secs(15)).await;
}
